﻿using FriendStar.Code;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using FriendStar.Application.VBaseData;
using FriendStar.Domain.Entity.VBaseData;
using System;

namespace FriendStar.Web.Areas.VBaseData.Controllers
{
    public class V_ZSJ_12_GH_SuProduction_DatStorKWController : ControllerBase
    {
        //
        // GET: /VBaseData/V_ZSJ_12_GH_SuProduction_DatStorKW/GetGridJson

        private V_ZSJ_12_GH_SuProduction_DatStorKWApp v_zsj_12_GH_SuProduction_DatStorKWApp = new V_ZSJ_12_GH_SuProduction_DatStorKWApp();

        public ActionResult SelectPart(Pagination pagination, string productionNO, string productionName, string proCompanyNO)
        {
            var data = new
            {
                rows = v_zsj_12_GH_SuProduction_DatStorKWApp.GetList(pagination,productionNO,productionName,proCompanyNO),
                total = pagination.total,
                page = pagination.page,
                records = pagination.records
            };
            //var data = v_zsj_12_GH_SuProduction_DatStorKWApp.GetList(pagination,productionNO,productionName,proCompanyNO);
            return Content(data.ToJson());
        }

        public ActionResult SelectPartForDropList()
        {
            var expression = ExtLinq.True<V_ZSJ_12_GH_SuProduction_DatStorKWEntity>();
            var data = v_zsj_12_GH_SuProduction_DatStorKWApp.SelectPartForDropList().OrderBy(t => t.FProductionNO);
            return Content(data.ToJson());
        }

    }
}

 

 
